#include <thread>
#include <iostream>
#include <atomic>
using namespace std;



int main()
{
    //int counter = 0;
    atomic<int> value(10);
    cout << "Value = " << value << endl;
    int fetched = value.fetch_add(4);
    cout << "Fetched = " << fetched << endl;
    cout << "Value " << value << endl;  
    return 0;
}